package com.zbkj.admin.service;

import com.zbkj.common.model.project.EstimateAi;
import com.zbkj.common.model.project.ProjectInfo;
import com.zbkj.common.model.project.ProjectInformation;
import com.zbkj.common.request.project.AiEstimateRequest;
import com.zbkj.common.request.project.AiNotifyRequest;
import com.zbkj.common.request.project.EstimateFunToAiRequest;
import com.zbkj.common.vo.project.AiNotifyFunExcelParseVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Auther:
 * @Date: 2024/7/15 14:14
 * @Description:
 */
public interface AdminEstimateAiHandleService {

    /**
     * ai估算请求参数组装
     * @param sourceType 1 ai自动估算(项目文件) 2 手工需求拆分ai估算
     * @param aiRequest
     * @param projectInfo
     * @param estimateAiList
     * @param informationList
     */
    void estimateAiReqParamBuild(int sourceType, AiEstimateRequest aiRequest, ProjectInfo projectInfo, List<EstimateAi> estimateAiList, List<ProjectInformation> informationList);

    /**
     * 估算开始ai请求
     * @param aiRequest
     */
    void estimateStartAiRequest(AiEstimateRequest aiRequest);

    /**
     * 估算停止 ai请求
     * @param projectId
     */
    void estimateStopAiRequest(Long projectId);

    /**
     * 估算结果AI回调处理
     * @param notifyRequest
     * @param request
     */
    void estimateAiNotify(AiNotifyRequest notifyRequest, HttpServletRequest request);

    void notifyIpCheck(HttpServletRequest request);

    /**
     * ai估算通知结果文件内容解析
     * @param notifyParam
     * @return
     */
    List<AiNotifyFunExcelParseVo> aiNotifyFileParse(AiNotifyRequest notifyParam);

    void estimateFunToAiCall(EstimateFunToAiRequest aiRequest);
}
